import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '@/views/home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/authentication',
    name: '企业信用认证首页',
    component: () => import('@/views/authentication/index')
  },
  {
    path: "/selectType",
    name: '企业信用认证选择类型',
    component: () => import('@/views/authentication/selectType')
  },
  {
    path: "/flow1",
    name: '企业信用认证流程一',
    component: () => import('@/views/authentication/flow/flow1')
  },
  {
    path: "/flow2",
    name: '企业信用认证流程二',
    component: () => import('@/views/authentication/flow/flow2')
  },
  {
    path: "/flow3",
    name: '企业信用认证流程三',
    component: () => import('@/views/authentication/flow/flow3')
  },
  {
    path: "/flow4",
    name: '企业信用认证流程四',
    component: () => import('@/views/authentication/flow/flow4')
  },
  {
    path: "/flow5",
    name: '企业信用认证流程五',
    component: () => import('@/views/authentication/flow/flow5')
  },
  {
    path: "/flow5-1",
    name: '企业信用认证流程五1',
    component: () => import('@/views/authentication/flow/flow5-1')
  },
  {
    path: "/flow6",
    name: '企业信用认证流程六',
    component: () => import('@/views/authentication/flow/flow6')
  },
  {
    path: "/flow7",
    name: '企业信用认证流程七',
    component: () => import('@/views/authentication/flow/flow7')
  },
  {
    path: "/flow8",
    name: '企业信用认证流程八',
    component: () => import('@/views/authentication/flow/flow8')
  },
  // 信用报告查询
  {
    path: "/report",
    name: '信用报告查询',
    component: () => import('@/views/report/index')
  },
  {
    path: "/getReport",
    name: '获取报告',
    component: () => import('@/views/report/getReport')
  },
  {
    path: "/submit",
    name: '提交',
    component: () => import('@/views/report/submit')
  },
  {
    path: '/brran/riskqueryind',
    name: '企业风险扫描',
    component: () => import('@/views/brran/riskqueryind')
  },
  {
    path: "/brran/riskDetails",
    name: '企业风险扫描详情',
    component: () => import('@/views/brran/riskqueryind/riskDetails')
  },
  // 信用信息查询
  {
    path: "/query/index",
    name: '信用信息查询首页',
    component: () => import('@/views/query/index')
  },
  {
    path: "/query",
    name: '信用信息查询',
    component: () => import('@/views/query/query')
  },
  {
    path: "/advancedQuery",
    name: '高级查询1',
    component: () => import('@/views/query/advancedQuery')
  },
  {
    path: "/advanced",
    name: '高级查询结果',
    component: () => import('@/views/query/advanced')
  },
  {
    path: "/dem",
    name: '高级查询',
    component: () => import('@/views/dem')
  },
  // 用户中心
  {
    path: '/user',
    name: '用户中心',
    redirect: "/myReport",
    meta: {
      title: "数字金融服务平台-商驿科技",
    },
    component: () => import('@/views/userCenter/index'),
    children: [
      {
        path: '/myReport',
        name: '我的报告',
        meta: {
          title: "数字金融服务平台-商驿科技",
        },
        component: () => import('@/views/project/myReport'),
      },
      {
        path: '/myAuthentication',
        name: '我的认证',
        meta: {
          title: "数字金融服务平台-商驿科技",
        },
        component: () => import('@/views/project/myAuthentication'),
      },
      {
        path: '/sweepRecord',
        name: '风险扫描记录',
        meta: {
          title: "数字金融服务平台-商驿科技",
        },
        component: () => import('@/views/project/sweepRecord'),
      },
      {
        path: "/userDetails",
        name: '我的认证详情',
        meta: {
          title: "数字金融服务平台-商驿科技",
        },
        component: () => import('@/views/project/userDetails'),
      },
      {
        path: "/userCenter",
        name: '我的认证详情1',
        meta: {
          title: "数字金融服务平台-商驿科技",
        },
        component: () => import('@/views/project/userCenter.vue'),
      },


    ]
  },
  {
    path: '/initial',
    name: '等等',
    meta: {
      title: "湖北国际贸易数字化平台测试版",
      index: 14,
      auth: true,
    },
    component: () => import('@/views/result/initial'),
  },
  {
    path: '/gain',
    name: '等一等',
    meta: {
      title: "湖北国际贸易数字化平台测试版",
      index: 14,
      auth: true,
    },
    component: () => import('@/views/result/gain'),
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
